function preload(images)
{
    if (typeof document.body == "undefined")
        return;
    var div = document.createElement("div");
    var s = div.style;
    s.position = "absolute";
    s.top = s.left = 0;
    s.visibility = "hidden";
    s.left = 0;
    s.top = 0;
    s.width = 30 + 'px';
    s.height = 30 + 'px';
    document.body.appendChild(div);
    div.innerHTML = '<img style="width: 30px; height: 30px;" src="' + images.join('" /><img style="width: 30px; height: 30px;" src="') + '" />';
}

//preload([
//    'http://lib.w/assets/img/b5.jpg'
//])